package com.example.backend.mapper;


import com.example.backend.pojo.User;
import com.example.backend.pojo.Usertype;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UsertypeMapper {
    @Select("select * from usertype")
    List<Usertype> getall();

    @Update("update usertype set first=#{first},second =#{second},third=#{third} where usertypeid=#{usertypeid} ")
    void update(Usertype usertype);

    @Select("SELECT * FROM user,usertype where user.usertypeid=usertype.usertypeid and usertype.usertypeid=#{usertypeid}")
    List<User> getuser(String usertypeid);
}
